create instance of class given class name string c#

68

create instance of class given class name string c# -

public object GetInstance(string strFullyQualifiedName)
{         
     Type t = Type.GetType(strFullyQualifiedName); 
     return  Activator.CreateInstance(t);         
}

Comments

Submit
0 Comments